package com.wing.product.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.product.model.entity.WarehouseSettledEntity;
import com.wing.product.model.response.WarehouseContractFeeVO;
import com.wing.product.model.response.WarehouseContractProductVO;
import com.wing.product.model.response.WarehouseSettledContractVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

@Mapper
public interface WarehouseSettledDao extends BaseMapper<WarehouseSettledEntity> {
    List<WarehouseSettledEntity> list4app(Page<WarehouseSettledEntity> pg, @Param("params") Map<String, Object> paramMap);

    void updateStatus(@Param("id")Long id ,@Param("status")Integer status );


    @Select("SELECT * FROM warehouse_settled WHERE id = #{id}")
    WarehouseSettledEntity selectByIdWithoutVersion(Long id);

    WarehouseSettledContractVO findByContactId(Long id);

    List<WarehouseContractFeeVO> findFeeByContactId(Long id);

    List<WarehouseContractProductVO> findVarietyByContactId(Long id);

    List<WarehouseSettledEntity> findAllContactByFactoryId(@Param("factoryId")String factoryId,@Param("warehouseCustomerId")Long warehouseCustomerId);


}
